<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition template="/templatePrincipal.xhtml" xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <ui:define name="conteudo" >
        <rich:spacer height="20"/>
        <center>
            <rich:messages layout="table"
                           errorClass="errorClass"
                           infoClass="infoClass"
                           warnClass="warnClass"
                           styleClass="painelMensagem"
                           ajaxRendered="true"/>
        </center>
        <rich:spacer height="10"/>
        <a4j:form ajaxSubmit="true">
            <center>
                <rich:dataTable id="dtParticipantes"
                                value="#{participanteAction.listaUsuarios}" var="_participante"
                                width="50%"
                                cellpadding="0" cellspacing="0"
                                captionClass="bold"
                                columnClasses="colunaCentralizada,colunaCentralizada,colunaCentralizada"
                                columnsWidth="70,130"
                                onRowMouseOver="this.style.backgroundColor='#eff7ff'"
                                onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
                    <f:facet name="header">
                        Participantes
                    </f:facet>
                    <rich:column>
                        <f:facet name="header">
                            Login
                        </f:facet>
                        #{_participante.login}
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">
                            Nome
                        </f:facet>
                        #{_participante.nome}
                    </rich:column>
                </rich:dataTable>
            </center>
            <br></br>
        </a4j:form>

        <rich:panel>
            <center>
                <h:panelGrid cellpadding="0" cellspacing="0" columns="30"
                             style="vertical-align:middle">
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:outputText value="O valor total do bolão está em : R$ #{participanteAction.valorTotalBolao}"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                    <h:graphicImage value="/resources/images/money.png" style="padding-right:5px;"/>
                </h:panelGrid>
            </center>
        </rich:panel>
    </ui:define>
</ui:composition>
